package com.laamella.syntherface.synths.models;

import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 * TODO Something wrong in the inheritance tree here...
 * @author danny
 *
 */
@SuppressWarnings("serial")
public abstract class DerivedParameterModel extends ParameterModel {

	protected final ParameterModel concreteParameter;

	public DerivedParameterModel(String name, ParameterModel originalParameter, ParameterType type) {
		super(name, type);
		this.concreteParameter = originalParameter;
		originalParameter.addChangeListener(new ChangeListener(){
			@Override public void stateChanged(ChangeEvent arg0) {
				fireStateChanged();
			}});
	}
	
	@Override public abstract int getValue();
	
}
